The present invention relates to apparatuses, methods, and programming for automatically laying out documents. Many of the invention""s aspects relate to such automatic document layout in the context of variable data publishing.
Programs have been created in the prior art for laying out documents, such as the pages of books, magazines, brochures, or even individual pages created in a word processor document. Most such programs are also capable of laying out an image of a page, interactively, on a computer screen. Some such programs define a document as a collection of text and shape elements. Such text elements each have text attributes, such as font, size, indentation, etc. Such shape elements include image elements, graphic shapes, and text containers, and can have shape attributes, such as position, size, color, border characteristics, fill color, etc. In many such systems, a user can define a template which includes various text and shape elements, such as the template of a newsletter, a set of related brochures, or a given type of letter, and then users can insert individual content into all, or some of, the template""s elements as desired. When the system lays out the document, each element will be displayed with its associated attributes.
In such systems, as the content placed into various elements of a template changes, those elements often change in size. Such size changes can make the template look inappropriate. In systems where the user is entering the variable content manually with a mouse or keyboard, or in which a user has time to review each document for proper layout, it is often acceptable to have a user change the layout to account for such size changes. Nevertheless, even in such applications it would be desirable to have a layout system which can more appropriately automatically adjust to changes in the size of content placed into template elements.
Furthermore, there are many automatic layout applications in which it is quite impractical to have a user individually change the layout of each document. This is particularly true in variable data publishing, in which many different versions of a document are created automatically in response to different data records. FIG. 1 provides graphic representation of variable data publishing. In its highly simplified example, a document 2 is created from a document template 3. The template has variable elements 4, 5, 6, and 7 into which variable values 8, 9, 10, and 11 can be automatically mapped, depending upon the individual record 12 in the Profile Data Source 14 for which the document 2 is being produced. In the example of FIG. 1, the variable values 8, 9, and 10 are simple text (i.e., character string) values taken directly from the values of fields 15, 16, and 17 of a record 12A in the profile data source 14. The variable value 11 is an image contained in an image file 18 selected as a function of the xe2x80x9cSportxe2x80x9d field 17 in the profile data source.
Because variable data publishing often maps values which differ in size into variable elements, the appearance of a variable document can vary greatly. Furthermore, for some records, data may be missing for certain variable elements. But since variable data publishing often creates hundreds, or thousands, of different versions of a given document, it would be very costly to have each version""s layout individually reviewed and adjusted by a person to compensate for changes in the size of its variable values.
Also, although the relatively simple form of variable data illustrated in FIG. 1 can be very useful, it would be desirable to create a variable data publishing system which provides much greater flexibility in terms of possible content, and yet still tends to do a good job of automatically laying out the resulting documents in a way which is attractive to the eye. For example, it would be desirable to allow a given template to be used to communicate about a greater number of topics, using a greater range of possible variable content, and still have a high likelihood that the automatic layout of the document will look appropriate.
A few prior art systems have allowed the variable values which can be mapped into a template to be comprised of a sub-tree of text and/or shape elements. This greatly increases the flexibility of individual templates, but, if such sub-templates are allowed to vary in size, their use can increase the difficulty of achieving desirable layout. Similarly, it would be desirable to have a system which allows content data, including variable sub-templates, to be used in different templates and still look appropriate given the different size and shape available for it in such different locations.
Another issue in variable data publishing is that it often takes a lot of effort to define the rules used for mapping variable content into the variable elements of a template. In many prior art systems, defining rules to map variable values into a template often requires knowledge of data bases, programming scripts, and data base query languages. These are often different skill sets than those had by many of the graphic artists who are best at designing document templates.
Also it would be desirable in layout systems, including variable data publishing ones, to be able to have a system which makes it easier to create shape elements Which have a matching or coordinated appearance.
It is an object of the present invention to provide a system for laying out documents that can automatically adjust the layout process in a flexible and often appropriate manner to changes in the size of the contents placed inside document shape elements.
It is another object of the invention to provide such a system for laying out documents which makes it easy to create flexible document templates for use with such a system.
It is yet another object of the present invention to provide a variable data publishing system which provides flexible automatic adjustment in response to changes in the availability, nature, and/or size of variable data which is placed into variable elements of a document template.
It is still another object of the present invention to provide a variable data publishing system which allows more than just the contents of a variable element in a document template to change in response to the mapping of different variable values into those variable elements.
It is yet another object of the present invention to provide greater flexibility in the way in which a variable data publishing system allows document templates and content-mapping rules to be used together.
It is still another object of the present invention to provide greater flexibility in the way in which variable data can be selected for use in variable data publishing.
It is yet another object of the present invention to provide a layout system which allows greater ease and uniformity in the way in which the attributes of both text and shape elements can be defined.
The invention is most accurately described in the claims at the end of this specification, and those claims should be considered part of this Summary Of The Invention. However, to prevent lengthy repetition, the wording of the claims has not been repeated nor closely paraphrased in this section. Instead the following brief summary has been provided here to give a quick overview of the major different aspects of the invention and some of their uses. Since it is impossible to make such a brief overview as accurate as the detailed description contained in the claims, the following summary should not be used to limit the claims in any way. Furthermore, in the interest of brevity, many significant aspects of the invention recited in the claims are not mentioned in this summary, and the failure to mention such aspects here should not in any way be construed as an indication of their lack of importance. Finally, the brief description of the use of each aspect of the invention provided in this section is not, in any way, meant to provide a complete description of that aspect""s use, but instead is intended to give the reader a quick indication that each such aspect of the invention has a useful purpose.
According to one aspect of the present invention, a computerized system can lay out a document containing a combination of text and/or shape elements located within a sequence box, such as a vertical group box or a horizontal group box. A user interface enables a user to define such a sequence box, and one or more shape elements in it, including shapes having a minimize and/or maximize property in at least one dimension. The system automatically lays out elements of the document. This includes: a) arranging shape elements placed within the sequence box along the sequence box""s sequencing axis; b) minimizing the size given to any shape element which has the minimize property in a given dimension by tending to make the element as small as its contents, if any, will allow in the given dimension; and c) maximizing the size given to any shape element which has the maximize property in a given dimension by tending to make the element expand to encompass space available within the sequence box in the given dimension. This ability to automatically arrange shape elements which can both expand and contract within in a sequence box provides a useful tool for automatically arranging and sizing document elements in response to changes in variable data, particularly which such sequence boxes are nested.
According to another aspect of the invention, a computerized system can lay out a document template represented as a tree-shaped data structure having nodes corresponding to text and/or shape elements, some of which are variable elements. Content-mapping rules map user defined variable values into individual variable elements. The variable values can be sub-trees of text and/or shape element nodes. The user can give a shape element in such a sub-tree a maximize property in one or more dimensions. When a sub-tree value is mapped into a variable element, the root node of the sub-tree is grafted onto the variable element""s node in the template""s tree structure. The system lays out elements of the tree formed by the combination of the template""s tree and sub-trees which have been grafted onto it. If a shape element in such a sub-tree has the maximize attribute in a given dimension, the layout tends to make the given shape element expand to encompass space available in the given dimension, in the location in the document into which the given sub-tree has been mapped. This allows sub-template variable values mapped into locations with differing available space to automatically adjust all, or part of their size, so as to more appropriately fit into such space.
According to a similar aspect of the invention, the user can define a sub-tree variable value to include a given shape into which a variable value can be mapped by content mapping rules, and can select that this given shape have a minimize property in at least one dimension. This will cause the layout of the document to tend to make the given shape element as small as the variable value, if any, mapped into the given shape value will allow in the given dimension. This allows the size of all, or a part of, a sub-template to automatically adjust to the size of its variable content.
According to another aspect of the invention, a computerized system can lay out a document template represented as a tree-shaped data structure comprised of text and/or shape nodes, in which the user can define a node of the tree to be a variable shape element having the maximize or minimize property in one or more dimensions. The layout of such document templates minimizes the size given to variable shape elements that have the minimize property and maximizes the size given to variable shape elements that have the maximize property. This ability to cause a variable shape element""s size to be defined either by the space around it or by the size of its own contents increases the ability of a template to make appropriate use of space as the size of its variable contents change.
According to still another aspect of the invention, a computerized system enables a user to select, as an anchor point, one of a plurality of locations on a given shape element within a document, and to vary the size of the contents of the given shape element. When the system lays out the document it can cause the size of the given shape element to be as small as the variable content will allow in one or more dimensions, while holding the given shape element""s anchor point fixed, so that other portions of the given shape element expand or contract in response to the varying size of the shape""s content relative to the fixed anchor point. This ability to control the direction in which shapes with variable contents expand and contract increases the ability of a template to maintain desired spatial relationships despite such size changes.
According to yet another aspect of the invention, a computerized system can lay out a document including variable image elements into which two dimensional images can be mapped. The system lets a user select a size attribute for a given variable image element in a first dimensions. When the system lays out the document, it gives the variable image element a size in the first dimension specified by the selected size attribute value and can automatically give the image a size in a second dimension which maintain the image""s aspect ratio. This allows images mapped into a variable document to be automatically scaled to a desired size without being distorted.
According to still another aspect of the invention, a computerized system, which lays out different custom versions of a variable document in response to data contained in different data sets, can automatically suppress the layout of variable shape elements into which content-mapping rules have failed to map variable shape values for a given data set. This can prevent unwanted space gaps from appearing in the layout of variable documents.
According to another aspect of the invention, the variable elements used in a variable data publishing system each have an associated content type and an associated set of attribute-value pairs. A variable element""s content type defines the type of variable value which can be mapped into the variable element. Such content types can include text, image, or template sub-tree. The variable element""s attribute-value pairs are used to define the properties of the variable element. In the case of text elements such attributes can include font, size, and color. In the case of shape elements, they can include size, position, and color. The variable values which can be mapped into a variable element of a given content type may include both content of the given content type and values for individual attributes of the variable element. The layout causes the appearance given to a variable element to vary as a function of both the content and attribute values, if any, of the variable value that has been mapped into the variable element. This increases the flexibility of a variable data publishing system by enabling variable values to not only change the content of variable elements, but also their attributes.
According to still another aspect of the invention, a computerized system lays out a variable document, represented as a template of layout elements, some of which are variable elements. The system allows a user to select, from among a plurality of stored content-mapping rule sets, a selected set of such rules which are used to map variable values into the variable elements of the template for a given layout. This provides much greater flexibility in the use of a given template, since it allows a template to be used with different rule sets, such as, for example, rule sets which obtain data from different data bases or rule sets which use different selection criteria.
According to yet another aspect of the invention, a computerized system lays out different custom versions of different variable documents in response to data contained in different data sets. The system stores a plurality of document templates, each including a corresponding set of one or more variable elements, and it stores a set of content-mapping rules for mapping variable values into the corresponding set of variable elements. The system enables a user to select a template from the plurality of stored templates, then uses the content-mapping rule set to map variable values into the variable elements in the selected template, and then lays out the selected template with the variable values that have been mapped into it. This allows the effort which has gone into creating a rule set to be used with multiple templates, such as, for example, templates for different forms of a given document or templates for different documents in a given transaction.
The ability to store templates and rule sets separately indicated in these last two aspects of the invention makes it easier for people will skills in graphic arts to design templates and those with skills in data base technology to create rule sets.
According to still another aspect of the invention, a computerized system lays out different versions of a variable document template for different data sets that include corresponding fields. The content-mapping rules stored by the system include variable-query content-mapping rules, each of which defines a data-base query that varies as a function of the value of one or more data set fields. When the system generates a given version of the variable document for a give data set, it generates an instance of the variable query defined by each variable-query content-mapping rule as a function of the value of one or more fields in the given data set. It then sends each such variable query to a corresponding data base. It maps the variable value fetched by the data base in response to each variable query into the one or more variable elements corresponding to the individual variable-query content-mapping rule which defined that query. Then it lays out the variable document with such variable values. Such variable-query content-mapping rules increase the flexibility with which variable values can be mapped into a variable document, since such queries allow variable values to be selected as a more complex function of the data set, or record, for which each variable document is being produced.
According to yet another aspect of the invention, a computerized system produces a visual representation of a document having text and shape elements. The system stores user-defined models which can include both text and geometric models. Each text model defines attributes values for any text element defined by reference to it. Such text attributes can include, for example, font, size, and color. Each geometric model defines attribute values for any shape element defined by reference to it. Such shape attributes can include, for example, size, position, border-type, and color. The system represents the document as a tree of text and shape elements in which each text or shape element can have attributes values associated with it by referencing one of the user-defined text or geometric models, respectively. The system lays out each element of the document with an appearance, position, and size determined as a function of attribute values associated with the element, including attribute values, if any, associated with an element by reference to one of the user-defined models. This allows users to define shape styles in a manner similar to that which other layout programs have allowed users to define text styles, and, thus, increases the ease with which a template designer can create shape elements which share a common look.
The computer systems described in the summary above can be claimed in the form of computer apparatus, in the form of computer programming stored in a computer readable memory, and in the form of computerized methods. It should also be understood, that other aspects of the invention include combining individual aspects of the invention described above.